using UnityEngine;
using System.Collections;

public class ShopItemScript : AbstractMenuScript {
	
	public SimpleMenuItem _textDisplay;
	private Shop _shop;
	private Item _item;
	private double _cost;
	
	
	public void BootStrap(Item item, double cost, Shop shop){
		_shop = shop;
		_cost = cost;
		_item = item;
		_textDisplay._text = _item.name + " $" + cost.ToString("0.00");
	}
	
	public override void Run(KeyCode k){
		
		Player _player = _shop.InShopPlayer;
		_player.Money -= _cost;
		_player.ShoppingList.PurchasedItem(_item);

	}
	
	
}
